<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@page import="java.text.SimpleDateFormat"%>
<%@ taglib uri="/struts-tags" prefix="s"%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
	<head>
		<title>数据库备份</title>

		<meta http-equiv="pragma" content="no-cache">
		<meta http-equiv="cache-control" content="no-cache">
		<meta http-equiv="expires" content="0">
		<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
		<meta http-equiv="description" content="This is my page">
		<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
<%! SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd hh:mm:ss");%>
    <script type="text/javascript">
       function deleteBack(id,filename){
          if(confirm('确定要删除吗？')){
            document.all("backup.id").value=id;
            document.all("backup.fileName").value=filename;
            document.getElementById("dForm").submit();
          }
       }
    </script>
	</head>

	<body>
		<div>
			<form action="/newbingo/test/Back_backup.action" method="post">
                 现在时间：<input type="text" name="fileName"  value="<%=sdf.format(new Date())%>"/>
                 <input type="submit" value="备 份"/>
			</form>
		</div>
		<table width="60%">
			<thead style="background-color: skyblue;">
				<tr>
					<td>
						文件名称
					</td>
					<td>
						备份时间
					</td>
					<td>
						操作
					</td>
				</tr>
			</thead>
			<tbody>
				<s:iterator value="pager.data">
					<tr>
						<td>
							${fileName }
						</td>
						<td>
							${backupTime }
						</td>
						<td>
							<a href="javascript:deleteBack(${id },'${fileName }')">删除</a>&nbsp;&nbsp;<a href="/newbingo/test/Back_restore.action?fileName=${backup.fileName }">还原</a>
						</td>
					</tr>
				</s:iterator>
			</tbody>
		</table>
       <form action="/newbingo/test/Back_delete.action" id="dForm" method="post">
         <input type="hidden" name="backup.id"/>
         <input type="hidden" name="backup.fileName"/>
       </form>
	</body>
</html>
